USE [BD_Taller]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF OBJECT_ID('dbo.spConsultarSecciones') IS NOT NULL
  DROP PROCEDURE dbo.spConsultarSecciones;
GO 

CREATE  PROCEDURE dbo.spConsultarSecciones
    @tipoUsuario char(1)
AS
BEGIN
	SET NOCOUNT ON;
	SELECT idSeccion, nombreSeccion, urlImagen
	FROM   dbo.seccion
	WHERE  idSeccion in (SELECT idSeccion 
						 FROM   dbo.Menu
						 WHERE  tipoUsuario = @tipoUsuario);
END
GO
